Static Analysis of Software by Boulanger Jean-Louis; Boulanger Jean-Louis;
Author:Boulanger, Jean-Louis; Boulanger, Jean-Louis;
Language: eng
Format: epub
ISBN: 1124674
Publisher: John Wiley & Sons, Incorporated
Published: 2013-01-18T16:00:00+00:00
4.6.2.1. Preliminary analysis of the application
The first stage of the static analysis of a source code is its “compilation” by the tool. To enable the compilation, we have taken into account the specificities of this application and configured Polyspace®, as described in Table 4.3.
Moreover, the Polyspace® compilation is stricter than the one carried out by common compilers, since it systematically verifies the respect of the ANSI/ISO C standard [ISO 90]. Thus, certain modifications have been brought to the application’s source code to correct the aspects that do not conform to ANSI C. Once this configuration is finished, the analysis of the application by Polyspace® is possible.
At this stage, the results show that the interruptions are not simulated. In particular, infinite loops were wrongly detected. We have deleted these cycles, which only delay the execution of the rest of the statements without changing their behavior. Then the analysis was correct but too expensive in terms of time.
Table 4.3. List of options necessary for the compilation
Polyspace®options Specificity of the application
-target i386
-OS-target no-predefined-OS
-I APPLICATIONS/WATCOMC_Includes Compiler WATCOMC
-dos The delimiter “\” is used instead of “/” in processed included file names
-discard-asm The assembly piece of code automatically skipped and stubbed
-DINTERRUPT=
-D far=
-DFAR= The “interruptions” and “far pointers” are skipped
We have then simplified the source code to enable a more efficient Polyspace® analysis. To reduce the number of pointers computed, we redefine functions without functional contribution (message logging), by associating a nohup semantic to them. We also replaced the Fatal_Fault, Fallback_ Position and Pseudo_ Fatal_Fault functions with definite stops of the execution. We also defined the function ALLOCATE_MEMORY to the standard malloc functions. By doing this, we divide the number of aliases calculated by Polyspace® by a factor of 5.8. Furthermore, we redefined the macro ASSERTION, which implants the control points, to a call to the assert function recognized by Polyspace®. During this preliminary work, were are able to detect and correct three run-time errors in the source code of the application.
Such adaptations are often necessary to make static analysis practicable at the source level because not all existing compiler extensions can be imbed in the analyzer and because some source code characteristics, such as the number of aliases, limit the efficiency of static tools.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12612)
Hello! Python by Anthony Briggs(9931)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9806)
The Mikado Method by Ola Ellnestam Daniel Brolund(9798)
Dependency Injection in .NET by Mark Seemann(9355)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8317)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7777)
Grails in Action by Glen Smith Peter Ledbrook(7711)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7573)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7248)
Microservices with Go by Alexander Shuiskov(7018)
Practical Design Patterns for Java Developers by Miroslav Wengner(6925)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6877)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6431)
Angular Projects - Third Edition by Aristeidis Bampakos(6293)
The Art of Crafting User Stories by The Art of Crafting User Stories(5814)
NetSuite for Consultants - Second Edition by Peter Ries(5745)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5558)
Kotlin in Action by Dmitry Jemerov(5080)
